import createPlugins from './vite/plugins';
import { UserConfig, ConfigEnv, loadEnv, defineConfig } from 'vite';

export default defineConfig(({ mode, command }: ConfigEnv): UserConfig => {
  const env = loadEnv(mode, process.cwd());
  return {
    plugins: createPlugins(env, command === 'build')
  };
});

